package com.hu.common.exception;


/**
 * @author 355760
 * @ClassName BizException
 * @Description 自定义业务异常类
 */
public class BizException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private final Integer code;

    public BizException(String msg) {
        super(msg);
        this.code = 500;
    }

    public BizException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    @Override
    public String toString() {
        return "BizException{" + "code='" + code + '\'' +
                '}';
    }

}
